function drawText( context, string )
{
    context.font = "normal italic 50px sans-serif";
    context.strokeText( string, 50, 100 );
    
    context.font = "normal italic 50px sans-serif";
    context.fillText( string, 51, 101 );
}

function drawLine( context )
{
    context.beginPath();
    context.strokeStyle = "red";
    context.moveTo( 50,  115 );
    context.lineTo( 700, 115 );
    context.stroke();
}

window.onload = function ()
{
    var canvas = document.getElementById('canvas');
    if ( !canvas.getContext )
    {
        return;
    }
        var context = canvas.getContext('2d'); 
        var string  = "Hello, World";
        
        drawText( context, string );
        drawLine( context );
}